#include<stdio.h>
int main() 
{
	unsigned long a=0;
	unsigned long b=0;
	unsigned long c=0;
	unsigned long ret=0;
	unsigned long i=0;
	scanf("%ld %ld %ld",&a,&b,&c);
	unsigned long arr[9]={0}; 
 	double div=(a*1.0)/(b*1.0);
 	unsigned long add=div*1000000000;			
	for(i=0;i<=8;i++)
	{
		 ret=add%10;
		arr[8-i]=ret;
		add/=10;
	}
	for(i=c -1 ;i<c+2  ;i++)
	{
		printf("%ld",arr[i]);
	}
	printf("\n%.10lf",div);
	return 0;
}
//abcd.efghijklmn
//abcdefghijklmn
